package Pkmn;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import Pkmn.Pkmn_Enums.Pkmn_StatName;
import partes_GUI.Stats_GUI.StatComponentFactory;
import partes_GUI.Stats_GUI.StatScrollBar;
import partes_GUI.Stats_GUI.StatTF;

public class Pkmn_SCF extends StatComponentFactory<Pkmn_StatName>{

	private class Pkmn_IV extends StatTF{
		private static final long serialVersionUID = 3321811522628128711L;

	private class minmax implements KeyListener{
		private StatTF st;
		public minmax(StatTF st){
			this.st=st;
		}
		public void keyPressed(KeyEvent arg0) {}

		public void keyReleased(KeyEvent arg0) {
			if (!st.getText().equals("")){
				if (Integer.parseInt(st.getText())>31)
					st.setText(31+"");}
			else st.setText(0+"");
		}

		public void keyTyped(KeyEvent arg0) {}
		
	}
		public Pkmn_IV(){
			super(30, 20, true);
			this.addKeyListener(new minmax(this));
		}
		
		public void actualizar() {		
		}
	}
	
	public StatScrollBar crearStatScrollBar() {
		return null;
	}

	public StatTF[] crearStatTFs() {
		StatTF[]aux={new Pkmn_IV()};
		return aux;
	}

	public Pkmn_StatName[] ids() {
		return Pkmn_StatName.values();
	}

}
